package com.todo.event.activity.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author azhebuxing
 * @date 2025/1/7 13:30
 * @description
 */
@Getter
@AllArgsConstructor
public enum EventActivityQueueType {

    NOMAL(1, "NOMAL", "普通队列"),
    SPEED(2, "SPEED", "高速队列"),
    ;

    private static Map<Integer, EventActivityQueueType> typeMap = Arrays
            .stream(EventActivityQueueType.values())
            .collect(Collectors.toMap(EventActivityQueueType::getType, item -> item, (v1, v2) -> v2));

    private int type;
    private String code;
    private String name;


    public static EventActivityQueueType getByType(Integer type) {
        return typeMap.get(type);
    }
}
